﻿using System;
using System.Data;
using System.Configuration;
using System.Web;

using Com.Yoeso.ORM.Common;
using Com.Yoeso.ORM.Framework;
using Com.Yoeso.ORM;

namespace Com.Yoeso.Entity
{
    [TableName("calendar_class")]
    public class CalendarClass
    {
        public static CalendarClass Retrieve(String id)
        {
            Key key = new Key(typeof(CalendarClass), true, "ID", id);
            CalendarClass data = null;
            try
            {
                data = SqlProvider.ORMBroker.RetrieveInstance(typeof(CalendarClass), key) as CalendarClass;
            }
            catch { }
            return data;
        }

        private string id;
        [TableColumn("ID", true), PrimaryKey(AutoGenerated = false)]
        public string ID
        {
            get { return id; }
            set { id = value; }
        }

        private string name;
        [TableColumn("Name", true)]
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        private string desc;
        [TableColumn("Description", true)]
        public string Desc
        {
            get { return desc; }
            set { desc = value; }
        }

        private bool isprivate;
        [TableColumn("IsPrivate", true)]
        public bool IsPrivate
        {
            get { return isprivate; }
            set { isprivate = value; }
        }

        private bool isshow;
        [TableColumn("IsShow", true)]
        public bool IsShow
        {
            get { return isshow; }
            set { isshow = value; }
        }

        private string memberid;
        [TableColumn("MemberID", true)]
        public string MemberID
        {
            get { return memberid; }
            set { memberid = value; }
        }

        private int red;
        [TableColumn("Red", true)]
        public int Red
        {
            get { return red; }
            set { red = value; }
        }

        private int green;
        [TableColumn("Green", true)]
        public int Green
        {
            get { return green; }
            set { green = value; }
        }

        private int blue;
        [TableColumn("Blue", true)]
        public int Blue
        {
            get { return blue; }
            set { blue = value; }
        }

        private bool isdelete;
        [TableColumn("IsDelete", true)]
        public bool IsDelete
        {
            get { return isdelete; }
            set { isdelete = value; }
        }

        private Int64 createtime;                      
        [TableColumn("CreateTime", true)]
        public Int64 CreateTime
        {
            get { return createtime; }
            set { createtime = value; }
        }

        private Int64 rowtime;
        [TableColumn("RowTime", true)]
        public Int64 RowTime
        {
            get { return rowtime; }
            set { rowtime = value; }
        }
    }
}
